package com.sfac.java_spring_boot_02.modules.test.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sfac.java_spring_boot_02.modules.common.entity.AbstractEntity;


import javax.persistence.*;

/**
 * @Description Card
 * @Author HymanHu
 * @Date 2021/9/14 13:51
 */
@Entity
@Table(name="test_card")
public class Card extends AbstractEntity {

    private String cardNo;

    @OneToOne(mappedBy="card", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JsonIgnore
    private Student student;

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }
}
